function el(n){return document.getElementById(n)}function eltn(n,t){return t?t.getElementsByTagName(n):document.getElementsByTagName(n)}function getParentWithTagName(n,t){var i=n.parentNode;if(i)return i.tagName.toUpperCase()==t.toUpperCase()?i:getParentWithTagName(i,t)}function browserIsIE(){return/*@cc_on!@*/!1}function IsHubbPage(){return document.location.pathname.toLowerCase().startsWith("/hubb/")||$e("body").hasClass("app-body")}function isPwa(){return window.matchMedia("(display-mode: fullscreen)").matches||window.matchMedia("(display-mode: standalone)").matches||window.matchMedia("(display-mode: minimal-ui)").matches}function toggleDisplay(n){toggleElemDisplay(el(n))}function toggleElemDisplay(n){setElemDisplay(n,n.style.display=="none")}function setElemDisplay(n,t,i){n&&(n.style.display=i?t?i:"none":t?"":"none")}function getQSVal(n,t){var f,u,i,r;if(n=="")return null;for(f=n.substring(1),u=f.split("&"),i=0;i-1?$e(EndisForm()).prop("action",r.substr(0,f)+setQSVal(r.substring(f),n,t)):t!=""&&$e(EndisForm()).prop("action",r+"?"+n+"="+t)}}function TrimString(n){return n?n.replace(/^\s+|\s+$/g,""):n}function LTrimString(n){return n?n.replace(/^\s+/,""):n}function RTrimString(n){return n?n.replace(/\s+$/,""):n}function EndisForm(){var n=el("frm1"),t,i;if(n&&n.tagName==="FORM"||(n=el("aspnetForm")),!n||n.tagName!=="FORM")for(t=0;t=0)return!0;n=n.parent}return!1}function FindDialogObject(){var t,n;if(typeof dlg!="undefined")t=dlg;else for(n=window.self;!(t||n==window.top);)n=n.parent,typeof n.dlg!="undefined"&&(t=n.dlg);return t}function urlEncodeCharacter(n){return"%"+n.charCodeAt(0).toString(16)}function urlEncode(n){return encodeURIComponent(n).replace(/\%20/g,"+").replace(/[!'()*~]/g,urlEncodeCharacter)}function loadURLToInnerHTML(n,t,i){setElemDisplay(el(i),!0);setElemDisplay(el(t),!1);var r=function(n){setElemDisplay(el(i),!1);setElemDisplay(el(t),!0);el(t).innerHTML=n};loadXMLDocAndCall(n,r)}function EnforceTextBoxMaxLength(n,t,i){return{8:!0,37:!0,38:!0,39:!0,40:!0,46:!0}[n.keyCode]?!0:t.value.length<=i}function GetMaxZIndex(){var n=0;return $e("body").find(":visible").each(function(){var t=parseInt($e(this).css("z-index"));n=t>n&&t<2e9?t:n}),n}function CalculateAge(n,t){var i=t.getFullYear()-n.getFullYear(),r=t.getMonth()-n.getMonth();return(r<0||r===0&&t.getDate()"+r+"<\/i>
"+u)};executeWhenObjDefined(t,"myLightbox")},r=function(){loadXMLDocAndCall(t,i)};loadLightBoxJS(r)}function linkToImageURL(n,t){loadLightBoxJS();var i=function(){myLightbox.showEndisImage(n,t)};executeWhenObjDefined(i,"myLightbox")}function linkToFile(n){document.location.href="/Publisher/File.aspx?ID="+n}function getXMLHttpRequest(){try{return new XMLHttpRequest}catch(n){}try{return new ActiveXObject("Msxml3.XMLHTTP")}catch(n){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(n){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(n){}return!1}function processReqChange(n,t,i){return function(){if(i.readyState==4)if(i.status==200){var r=i.responseText;n&&n(r)}else t?t(i.statusText):alert("There was a problem retrieving the XML data:\n"+i.statusText)}}function MarkAbuseAJAXCall(n,t){var i=function(n){alert("An error was encountered:\n"+n)};loadXMLDocAndCall("/Modules/UserControls/Comments/MarkAsAbusive.aspx?"+n,t,i)}function MarkCommentAsAbusive(n,t,i){confirm("REPORT THIS TO A MODERATOR \n\nIf you feel this comment is inappropriate you can report it to a \nmoderator, who will then review the comment and can remove it if necessary.\nThe comment will be hidden from view until a moderator reviews it. \n\nAre you sure you want to report this comment to a moderator?")&&(MarkAbuseAJAXCall("mark=comment&cid="+n),t&&setElemDisplay(el(t),!1),i&&setElemDisplay(el(i),!1))}function MarkThreadAsAbusive(n,t){confirm("REPORT THIS TO A MODERATOR \n\nIf you feel this discussion topic is inappropriate you can report it to a \nmoderator, who will then review the message and can remove it if necessary.\nThe discussion topic will be hidden from view until a moderator reviews it. \n\nAre you sure you want to report this topic to a moderator?")&&MarkAbuseAJAXCall("mark=thread&tid="+n,function(){document.location.href="/Forums/Threads.aspx?ForumID="+t})}function SubscribeToComments(n,t,i,r,u){var f=function(n){alert("An error was encountered:\n"+n)};loadXMLDocAndCall("/Modules/UserControls/Comments/Subscribe.aspx?eid="+n+"&et="+t+"&a="+i,undefined,f);r&&setElemDisplay(el(r),!1);u&&setElemDisplay(el(u),!0)}function OpenChat(){alert("This feature is no longer available")}function OpenShopTermsAndConds(){var n="/Shop/TermsAndConditions.aspx";typeof EndisDialog=="function"?new EndisDialog(n,"Terms and Conditions",780,550):window.open(n,"","width=780,height=550,resizable=yes,scrollbars=yes")}function getCssStyle(n,t){return n.currentStyle?n.currentStyle[t]:window.getComputedStyle?document.defaultView.getComputedStyle(n,null).getPropertyValue(t):void 0}function setOpenAccordion(n,t){for(var u,f,e,o,r=t.items,i=0;i",{"class":"calendar-generic-popup"}).append($e("

").html("You can download information from the calendar in Comma Separated Value (.CSV) format to import into Outlook or another scheduling program."),$e("

").append(["Select period:",$e('",{type:"checkbox",id:t+"_chkReminders",checked:"checked"}),$e("

").append([$e("
").html('Your browser has blocked the CSV download. You can get it by right-clicking on the link below and choosing "Save as.."<\/b>'),$e("",{href:u,target:"_blank"}).html("Download").click(n.Close)]))}))})};this.HideEmptyContainers=function(){$e(".calendar_day_wrapper",v).filter(function(){return $e(this).find(".calendar_event:visible").length===0}).addClass("hide-in-list");$e(".calendar_week",v).filter(function(){return $e(this).find(".calendar_day_wrapper:visible").length===0}).addClass("hide-in-list");$e(".calendar_body",v).toggleClass("no-upcoming-events",$e(".calendar_week:visible",v).length===0)};this.ResetContainers=function(){$e(".calendar_day_wrapper, .calendar_week",v).removeClass("hide-in-list")};this.ToggleOverflow=function(n){var t=$e(n.currentTarget);t.find("span.calendar_event_show_more").is(":visible")?(t.closest(".calendar_day").find(".calendar_event_overflow").removeClass("calendar_event_overflow"),t.find("span.calendar_event_show_more").hide(),t.find("span.calendar_event_show_less").show()):(y.ResetOverflowForDay(t.closest(".calendar_day")),t.find("span.calendar_event_show_less").hide(),t.find("span.calendar_event_show_more").show())};this.ResetOverflowForDay=function(t){var u=t.closest(".calendar_body").hasClass("calendar-list-view")?s:h,f=t.find(".calendar_event:visible"),i=$e(".calendar_day_more_events",t),r=f.length-u;r>0?(t.find(".calendar_event:visible").slice(u).addClass("calendar_event_overflow"),i.show(),$e("span.calendar_event_show_more",i).show().html("+"+r+" more "+(n?"booking":"event")+(r>1?"s":"")+" on this day"),$e("span.calendar_event_show_less",i).hide()):i.hide()};this.ResetAllOverflows=function(){$e(".calendar_event",v).removeClass("calendar_event_overflow");$e("div.calendar_day_more_events",v).hide();$e(".calendar_day",v).each(function(){y.ResetOverflowForDay($e(this))})};this.TogglePastEvents=function(){y.ResetContainers();$e(".calendar_show_past",v).hasClass("past-events-visible")?($e(".calendar_show_past",v).removeClass("past-events-visible"),$e(".calendar_show_past a",v).html("Show past "+(n?"bookings":"events")+" in this month"),$e(".day_in_past",v).removeClass("show-in-list")):($e(".calendar_show_past",v).addClass("past-events-visible"),$e(".calendar_show_past a",v).html("Hide past "+(n?"bookings":"events")+" in this month"),$e(".day_in_past",v).addClass("show-in-list"));y.HideEmptyContainers()};this.ToggleView=function(){$e(".ui-tooltipped",v).uitooltip("close");$e(".calendar_body",v).hasClass("calendar-list-view")?($e(".calendar_body",v).removeClass("calendar-list-view"),$e(".list-view-toggle i",v).removeClass("mdi-action-view-module").addClass("mdi-action-view-list").prop("title","List view"),$e(".day_in_past",v).removeClass("show-in-list"),y.ResetContainers(),SetQSAndForm("CalendarView"+p,"")):($e(".calendar_body",v).addClass("calendar-list-view"),$e(".list-view-toggle i",v).removeClass("mdi-action-view-list").addClass("mdi-action-view-module").prop("title","Grid view"),y.HideEmptyContainers(),SetQSAndForm("CalendarView"+p,"list"));y.ResetAllOverflows()};this.CloseExportDialog=function(){w.Close()};this.DoExport=function(n){var t,u;switch($e(n).val()){case"xml":t="https://"+document.location.host+"/Calendar/rss.xml";w=new ModalDialog({width:600,height:120,maximisable:!1,autoShrink:!1,autoGrow:!0,mobilePinToBottom:!0,elem:$e("
",{"class":"calendar-generic-popup"}).append("Click the link to open (or right click to save):
",$e("
",{href:t,target:"_blank",on:{click:y.CloseExportDialog}}).html(t))});break;case"ical":CalendarEvents.OpenICalPopup("https://"+document.location.host+"/Calendar/Calendar.ics"+l);break;case"pdf":t="https://"+document.location.host+"/Calendar/Calendar.pdf?month="+i+"&year="+r+"&group="+$e(".group-selector",v).val()+"&filter="+($e(".include-subgroups",v).is(":checked")?"":"2");u=window.open(t,"_blank");u||(w=new ModalDialog({width:600,height:120,maximisable:!1,autoShrink:!1,autoGrow:!0,mobilePinToBottom:!0,elem:$e("
",{"class":"calendar-generic-popup"}).append("Click the link to open (or right click to save):
",$e("
",{href:t,target:"_blank",on:{click:this.CloseExportDialog}}).html(t))}));break;case"csv":y.showCSVPopup()}$e(n).val("")};this.ApplyFilters=function(){$e(".group-selector",v).removeClass(function(n,t){return(t.match(/(^|\s)event-group-\S+/g)||[]).join(" ")});$e(".group-selector",v).addClass($e(".group-selector option:selected",v).attr("class"));y.ResetContainers();$e(".calendar_event",v).removeClass("group-filtered-show");var t=$e(".group-selector",v).val();typeof t=="undefined"||t==""?($e(".calendar",v).removeClass("group-filtered"),$e(".group-selector .all-groups",v).text("Filter by "+(n?"resource":"group")),$e(".calendar_children_select",v).hide()):($e(".calendar",v).addClass("group-filtered"),$e(".group-selector .all-groups",v).text("ALL "+(n?"RESOURCES":"GROUPS")),$e(".calendar_children_select",v).show(),$e(".include-subgroups",v).is(":checked")?$e(".calendar_event",v).filter(function(){var n=$e.grep(this.className.split(" "),function(n){return n.indexOf("event-path_")===0}).join();return n.indexOf("_"+t+"_")>-1}).addClass("group-filtered-show"):$e(".calendar_event.event-group-"+t,v).addClass("group-filtered-show"));y.HideEmptyContainers();y.ResetAllOverflows()};this.GroupExistsInCalendar=function(n){var t=!1;return $e(".group-selector option",v).each(function(){if(this.value==n)return t=!0,!1}),t};this.ConfigureFromInitialSettings=function(){var t=!1,r,i,o,s;$e(".group-selector",v).val()!=u&&(y.GroupExistsInCalendar(u)||$e(".group-selector option",v).eq(1).before($e("